<? 
session_start(); 
include "sesslogin.php";
?>
<? 
include("../db_connect.php"); 
connect();
$sql="SET CHARACTER SET UTF8";   
query($sql); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="javascript" type="text/javascript">
<!--
/****************************************************
     Author: Eric King
     Url: http://redrival.com/eak/index.shtml
     This script is free to use as long as this info is left in
     Featured on Dynamic Drive script library (http://www.dynamicdrive.com)
****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
win=window.open(mypage,myname,settings);}
// -->
</script>
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/tiny_mce/tiny_mce.js"></script>
				<script type="text/javascript" src="../js/jquery-ui-1.8.16.custom.min.js"></script>
                    <script>
						$(function() {
							$( "#datepicker" ).datepicker({
								dateFormat: 'yy-mm-dd'
							});
						});
					</script>
<link href="../css/blitzer/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	tinyMCE.init({
		// General options
		mode : "textareas",
		theme : "advanced",
		relative_urls : false,
		
		plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",

		// Theme options
		theme_advanced_buttons1 : "bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "pasteword,preview,forecolor,backcolor,image,emotions,media,code,fullscreen",
		theme_advanced_buttons3 : "",
		theme_advanced_buttons4 : "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : false,
		

		
	});
</script>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Administrator System</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>

<body>
	<div id="header">
         	<div class="admin"><div style="float:left; width:500px;"><strong>Administrator System</strong></div><div style="float:right;">Login as	| <strong><?=$_SESSION[sess_uid_admin];?></strong></div></div>
            <div style="clear:both;"></div>
        </div>
	<div id="wrapper">
        <div id="banner" align="center"><img src="image/logo.jpg" alt="" width="469" height="133" /></div>
      <div id="container">
   	    <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="38"><img src="image/topleft.png" width="38" height="38" /></td>
                <td background="image/topbg.png">&nbsp;</td>
                <td width="38"><img src="image/topright.png" width="38" height="38" /></td>
              </tr>
              <tr>
                <td width="38" background="image/leftbg.png">&nbsp;</td>
                <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td height="30" align="center" valign="middle" bgcolor="#434343"><span class="menu"><a href="admin.php?mode=member_list.php">เพิ่มสมาชิก</a></span></td>
                    <td align="center" valign="middle" bgcolor="#434343"><span class="menu"><a href="admin.php?mode=membership_list.php">สมาชิกทั้งหมด</a></span></td>
                    <td align="center" valign="middle" bgcolor="#434343"><span class="menu"><a href="admin.php?mode=firstclass_list.php">สอบถามประกันชั้น 1</a></span></td>
                    <td align="center" valign="middle" bgcolor="#434343"><span class="menu"><a href="admin.php?mode=order_list.php">สั่งซื้อประกัน</a></span></td>
                    
                    <td align="center" valign="middle" bgcolor="#434343"><span class="menu"><a href="admin.php?mode=insure_list.php">ประกันทั้งหมด</a></span></td>
                    <td align="center" valign="middle" bgcolor="#434343"><span class="menu"><a class="menu" href="admin.php?mode=news_list.php">ข่าวสาร</a></span></td>
                    <td align="center" valign="middle" bgcolor="#434343"><span class="menu"><a href="admin.php?mode=user.php">จัดการผู้ใช้</a></span></td>
                    <td align="center" valign="middle" bgcolor="#434343"><span class="menu"><a href="admin.php?mode=email.php">จัดการอีเมลล์ </a></span></td>
                    <td align="center" valign="middle" bgcolor="#434343"><span class="menu"><a href="admin.php?mode=logout.php">ออกจากระบบ</a></span></td>
                  </tr>
                  <tr>
                    <td colspan="10" align="center" valign="top" class="darkgray13">&nbsp;</td>
                  </tr>
                  <tr>
                    <td colspan="10" align="center" valign="top" class="darkgray13">
                    <? 
				  	$mode=$_GET[mode];
				  	if(empty($mode)){
						echo "<p>welcome to admin system for www.centralbroker.co.th</p>";                        
                    }else{
                       include("$mode"); 
					}
					?>                    </td>
                  </tr>
                </table>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:50px;">
                  <tr>
                    <td height="30" align="center" valign="bottom" class="darkgray13" style="border-top:1px solid #cccccc;">Copyright © 2011 All Rights Reserved by Centralbroker</td>
                  </tr>
                </table>              
                </td>
                <td width="38" background="image/rightbg.png">&nbsp;</td>
              </tr>
              <tr>
                <td width="38"><img src="image/bottomleft.png" width="38" height="38" /></td>
                <td background="image/bottombg.png">&nbsp;</td>
                <td width="38"><img src="image/bottomright.png" width="38" height="38" /></td>
              </tr>
            </table>
      </div>
    </div>
</body>
</html>
